﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ShowRelato.aspx.cs" Inherits="ShowRelato" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script language="javascript" type="text/javascript">

    var _source;
    // keep track of the popup div
    var _popup;

    function ShowModalPopup(source) {
        this._source = source;
        this._popup = $find('mdlPopup');

        //  find the confirm ModalPopup and show it    
        this._popup.show();
    }




    function okClick() {
        //  find the confirm ModalPopup and hide it    
        this._popup.hide();
        //  use the cached button as the postback source
        __doPostBack(this._source.name, '');
    }

    function cancelClick() {
        //  find the confirm ModalPopup and hide it 
        this._popup.hide();
        //  clear the event source
        this._source = null;
        this._popup = null;
    }


</script>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <asp:Label ID="Label1" runat="server" Text="Cliente:"></asp:Label>
        &nbsp;<asp:Label ID="lblNomeCliente" runat="server"></asp:Label>
        <br />
        <asp:Label ID="Label2" runat="server" Text="CPF:"></asp:Label>
        <asp:Label ID="lblCPF" runat="server"></asp:Label>
        <br />
        <br />
        <asp:DataList ID="dtlRelatos" runat="server">
            <ItemTemplate>
                <asp:Label ID="Label3" runat="server" Text="Assunto:"></asp:Label>
                <asp:Label ID="lblAssunto" runat="server"></asp:Label>
                <br />
                <asp:Label ID="Label4" runat="server" Text="Data:"></asp:Label>
                <asp:Label ID="lblData" runat="server"></asp:Label>
                <br />
                <asp:ImageButton ID="ImageButton1" runat="server" CssClass="buttonsImages" 
                    ImageUrl="~/Images/Zoom-in.png" ToolTip="Vizualizar Relato" />
                <asp:ImageButton ID="ImageButton3" runat="server" CssClass="buttonsImages" 
                    ImageUrl="~/Images/Edit.png" />
                <asp:ImageButton ID="ImageButton2" runat="server" CssClass="buttonsImages" 
                    ImageUrl="~/Images/delete.png" />
            </ItemTemplate>
        </asp:DataList>
        <br />
        <asp:ImageButton ID="btnRelator" runat="server" 
            ImageUrl="~/Images/Notepad.png" 
            OnClientClick="ShowModalPopup(this); return false;" 
            onclick="btnRelator_Click" />
        <cc1:ModalPopupExtender ID="btnRelator_ModalPopupExtender" runat="server" 
            BackgroundCssClass="popUpPanel" DynamicServicePath="" Enabled="True" 
            PopupControlID="panNew" TargetControlID="panNew" BehaviorID="mdlPopup"
            OkControlID="btnOk" OnOkScript="okClick();" 
            CancelControlID="btnClose" OnCancelScript="cancelClick();">
        </cc1:ModalPopupExtender>
        
        <br />
        <br />
        <asp:Panel ID="panNew" runat="server" Width="872px">
        <fieldset style="margin: 1px 5px 0px 5px; text-align:center">
        <legend> Relato </legend>
            <asp:Label ID="Assunto" runat="server" CssClass="areaTexto" Text="Assunto"></asp:Label>
            <asp:TextBox ID="txtAssunto" runat="server" Width="312px"></asp:TextBox>
            <br />
            <br />
         <asp:TextBox ID="txtRelato" runat="server" Height="248px" TextMode="MultiLine" 
                Width="820px"></asp:TextBox>
            <br />
        </fieldset>
                <asp:ImageButton ID="btnOk" runat="server" CssClass="buttonsImages" 
                    ImageUrl="~/Images/Add.png" ToolTip="Adicionar" />

            <asp:ImageButton ID="btnClose" runat="server" CssClass="buttonsImages" 
                ImageUrl="~/Images/Close.png" ToolTip="Cancelar" />

        </asp:Panel>
        <cc1:DragPanelExtender ID="panNew_DragPanelExtender" runat="server" 
            DragHandleID="panNew" Enabled="True" TargetControlID="panNew">
        </cc1:DragPanelExtender>
        <br />
        <br />
    </ContentTemplate>
</asp:UpdatePanel>
</asp:Content>

<asp:Content ID="Content4" runat="server" 
    contentplaceholderid="ContentPlaceHolder2">

                <asp:Menu ID="Menu1" runat="server" Height="16px" 
                    Orientation="Horizontal" Width="46px" CssClass="menuPrincipal">
                <Items>
                    <asp:MenuItem ImageUrl="~/Images/people.png" 
                        SeparatorImageUrl="~/Images/separator.png" ToolTip="Clientes" 
                        NavigateUrl="~/Cliente.aspx">
                    </asp:MenuItem>
                    <asp:MenuItem ImageUrl="~/Images/folder.png" ToolTip="Adicionar Relato" 
                        NavigateUrl="~/Images/Add.png"></asp:MenuItem>
                </Items>
                </asp:Menu>
                
</asp:Content>


